1. Field of the Invention
This invention relates to a numerical control (NC) apparatus which controls a machine tool, an industrial robot or the like.
More specifically, this invention relates to an arrangement (apparatus and method) for compensating for backlash during feedback control by a numerical control apparatus. This backlash usually occurs in a feed drive mechanism controlled by the numerical control apparatus.
2. Description of the Related Art
A numerical control apparatus for controlling backlash is shown in FIG. 5.
The numerical control (NC) apparatus includes a main control unit 102, position control unit 103, velocity control unit 105 and an amplifier 107.
Main control unit 102 analyzes a mechanism program input from a paper tape 101, and calculates a motion value per one sampling period of control in the numerical control apparatus. Main control unit 102, then, outputs position command X.sub.c to position control unit 103 in the servo mechanism.
Position control unit 103 calculates a velocity command V.sub.c based on a difference between position command X.sub.c and position feedback signal X, and outputs Vc to velocity control unit 105. Position feedback signal X indicates the actual position of a table 21. It is detected using a position detector 17 attached to motor 109. Table 21 is an object controlled by the numerical control apparatus.
Velocity control unit 105 calculates torque command T.sub.c based on a difference between velocity command V.sub.c and velocity feedback signal V, and outputs Tc to amplifier 107. The velocity feedback signal V is a signal provided by a velocity detector 23 that is mechanically connected to motor 109. Torque command T.sub.c is power-amplified by amplifier 107 which provides a current difference I.sub.c corresponding to a difference between the current corresponding to output torque Tc and a feedback current. Current Ic causes motor 109 to generate torque.
The torque generated by current I.sub.c flowing through motor 109 is transferred to ball screw 15 via gear 11 and gear 13. Ball screw 15 converts the torque to a propulsive power for moving table 21.
There is formed a semi-closed loop servo mechanism which includes motor 109 gear 11, gear 13 and ball screw 15. The output torque of motor 109 is transferred to an control object, such as a table 21 or the like, via such a semi-closed loop servo mechanism.
However, the servo mechanism has a backlash which is caused by such gears and a ball screw. The backlash is particularly acute when the direction of motion of table 21 is changed. This backlash causes a machining error.
To compensate backlash, there is provided a command direction memory unit 25, old direction memory unit 31, command direction reverse judgement unit 27 and compensation value output unit 29 are provided for compensating a backlash when a control object is controlled to point in a fixed position.
Command direction memory unit 25 stores data relating to a direction commanded by main control unit 102 to position control unit 103 per one sampling period. The data of the direction of a motion is updated each sampling period.
Old direction memory unit 31 stores direction data which was output already, and changes the data if the direction commanded is changed.
Command direction reverse judgement unit 27 judges whether a command direction is reversed or is not the same as a command direction already commanded.
Compensation value output unit 29 outputs a backlash compensation value to position control unit 103. When a compensation command is input from command direction reverse judgement unit 27, the backlash compensation value is output to move much or less than a command value X.sub.c.
The process carried out by command direction reverse judgement unit 27 is shown in FIG. 6.
At step ST1, the command direction input from command direction memory unit 25 is examined and it is determined whether the command direction is negative, zero, or positive of the motion. When positive, process control goes to step ST21. When zero, the process is ended. When negative process control transfers to step ST22.
At step ST21, direction information stored in old direction memory unit 31 is judged that the direction is negative, zero, or positive. (Assume that direction data stored in old direction memory unit 31 is not zero.) If the result is positive, the process is ended. If the result is negative, the command position is reversed, then process control goes to step ST31.
At step ST31, compensation value output unit 29 is commanded to output a backlash compensation value. After the compensation value is output. Process control goes to step ST4.
At step ST4, motion direction stored in old direction memory unit is updated and the old direction stored is changed to the new direction which was commanded.
Step ST22 and step ST32 operate substantially the same as corresponding steps ST21 and ST31, however they apply when the decision at step STl is "negative".
Backlash compensation as shown in FIGS. 5 and 6 is carried out somewhat early rather than the time when the compensation is needed because of the existence of time lag in the control system including the drive mechanism. It is insufficient in the control timing for the compensation because of the unmatching of the feed speed and compensation.
FIG. 7 shows an example of cutting which is executed using simultaneous two axis control in a machine tool. X.sub.c is the position where backlash compensation is requested. Backlash compensation is executed at a position X.sub.p where the tool does not reach X.sub.o.
FIG. 8 is a graph which shows the relation between a cutting velocity and the time. Backlash compensation is carried out at time t.sub.p before the time when the velocity becomes zero. Accordingly, excess cutting is caused at the point X.sub.p on the circumference of the circle, and a swelling is also caused by the reaction. This is shown with a dotted line at the point of the change of a quadrant. This results in a machining error for a workpiece and causes a cutter mark on the workpiece.
Accordingly, it has been desirable to provide a backlash compensation method which can reduce such a generation of a excess cutting or a swelling at the change point of a quadrant in cutting of a workpiece.